
import java.util.Scanner;

public class ProfanityFilter
{
   public static void main(String[] args)
   {
      Scanner input = new Scanner(System.in);
      System.out.println("Enter a SENTENCE or ~ to quit: ");
      String sentence = input.nextLine();
      while(sentence.charAt(0)!='~')
      {
         
         Sentence mySentence = new Sentence(sentence);
         if(sentence.length()<5||mySentence.CountSpaces(sentence)<2)
         {
            System.out.println("This is not a SENTENCE.");
         }
         else
         {
         if(mySentence.isProfane())
            System.out.println("Sentence is profane.");
         else
            System.out.println("Sentence is fine.");
         }
         System.out.println("Enter a SENTENCE or ~ to quit: ");
         sentence = input.nextLine();
      }
      System.out.println("\n" + "Thank you.");
   }
}
